Skip to content

Restructure the audiobook-curator example as a composed React application - #315

Merged
ScriptedAlchemy merged 6 commits into
mainfrom
wave/audiobook-app-feel
Sep 2, 2026
Merged

Restructure the audiobook-curator example as a composed React application#315
ScriptedAlchemy merged 6 commits into
mainfrom
wave/audiobook-app-feel

Conversation

@ScriptedAlchemy

Copy link
Copy Markdown
Owner

Summary

The flagship framework-mode example previously funneled every MCP tool through one 40-line switch producing a single Agent.Text sentence, and 14 of 15 CLI commands never rendered at all. This PR restructures examples/audiobook-curator into a genuinely composed React application that demonstrates the framework's thesis by construction.

  • src/components/ — a shared, typed component library (CuratorDocument, DataList/Field/Callout, AudiobookCard, LibraryShelf, CandidateRanking, EvidenceTrail, MutationReceipt, ChapterOutline, IntegrityReport, CurationShelf, async LibraryAnalysis) reused across MCP tools, the catalog resource, the curate prompt, and rendered CLI commands. src/result.tsx (the switch) is deleted.
  • src/providers/library.ts — request-time ffmpeg/ffprobe probing and workflow stages, consumed by the catalog resource via (await agent()).providers.library with honest degraded rendering.
  • src/state.ts — workspace-durable curation shelf (editionSelected / mutationApplied / shelfCleared); select/apply routes dispatch and render the shelf; new read-only review_curation_shelf tool and rendered shelf CLI command make persistence visible across tool calls.
  • Suspense streamingaudit_library (and CLI library-audit) render an immediate shell and stream the duplicate/multipart analysis behind <Suspense fallback={<Agent.Progress/>}>; tests/route-unit/streaming.test.ts proves staged progress through the real MCP projector (renderRouteEvents + projectTargetCapabilities).
  • Rendered CLIinventory, select, audible-search, convert, audit promoted to .tsx, reusing the same components as their MCP twins; --json output remains the identical canonical receipt (parity proven in tests/route-unit/cli-rendered.test.ts). Plain .ts commands remain to demonstrate both modes.
  • README rewritten as the application tour; flagship Workbench e2e pins updated (16 tools, 32 CLI commands, 50 routes, visible provider:library row) with re-captured 1440×900 screenshots.

Route graph: 15 tools + 30 commands + 47 routes → 16 tools + 32 commands + 50 routes. Receipts, schemas, and canonical --json output are unchanged; no framework/package source changed (examples + one workbench test file), so no changeset.

Composition gaps found during the work were filed instead of hacked around: #312 (no shared layout convention) and #313 (providers do not mount for routed CLI/rendered scripts).

Test plan

  • AGENT_BUNDLE_TEST_TIME_SCALE=2 pnpm examples:check (all examples) green post-rebase
  • Example suite: 33 tests + 30 route-unit tests green (includes streaming projector proof, provider injection, state persistence, CLI receipt parity)
  • pnpm typecheck and pnpm lint green
  • pnpm test:examples:browser 5/5 in real Chrome at 1440×900, covering populated + stale-diagnostic + repair flows with re-captured screenshots

Refs #107.

…compose the catalog and curate routes (stage 2a)
…n shelf with a review tool and CLI command (stage 2b)
…application tour and update flagship Workbench pins (stage 4)
@changeset-bot

changeset-bot Bot commented Sep 2, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 8a70d8a

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@ScriptedAlchemy
ScriptedAlchemy merged commit b1cfe9e into main Sep 2, 2026
7 of 8 checks passed
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 2, 2026

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review Completed 2026-09-02T21:15:45.383113Z 8a70d8a PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@ScriptedAlchemy

Copy link
Copy Markdown
Owner Author

Post-merge regression note: this merge legitimately expanded the Audiobook Curator MCP surface from 17 to 18 generated routes, leaving examples-contract.test.ts pinned to the old count (and exact single-item content/resource arrays). The clean pre-merge parent passed and merge b1cfe9eb7 failed the focused contract test. Fixed in #328, merged as 3368b5b6a485506cc466ce4bb4920078a49db432.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant